package com.teemor.blog.api;

import com.teemor.blog.bean.dto.input.topic.AddTopicIDTo;
import com.teemor.blog.bean.dto.input.topic.QryTopicsIDTo;
import com.teemor.blog.bean.dto.input.topic.UpdTopicIDTo;
import com.teemor.blog.bean.dto.output.topic.QryTopicODTo;
import com.teemor.blog.bean.dto.output.topic.QryTopicsODTo;
import com.teemor.common.bean.utils.tmpl.ResponseBen;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author: zhoulk
 * @Description: 原子服务API接口
 * @date: 2019/11/26 14:50:14
 */
@Api(value = "原子服务API接口", description = "原子服务API接口")
@RequestMapping(value = "/topic")
public interface ITopicApiService {
     /** 
   * @Function: com.teemor.blog.service.ITopicApiService.qryTopicById
   * @Description: 根据主键查询
   * @param: topicId
   * @return: QryTopicODTo
   * @version: v1.0.0
   * @author: zhoulk
   * @date: 2019/11/26 14:50:14
   *
   * Modification History:
   * Date         author          Version            Description
   *------------------------------------------------------*
   * 2019/11/26 14:50:14     zhoulk           v1.0.0             修改原因
   *
   */
    @RequestMapping(value = "/topic/{topicId}", method = RequestMethod.GET)
    @ApiOperation(value = "ITopicApiService.qryTopic", notes = "根据主键查询接口 - zhoulk")
    QryTopicODTo qryTopic(@PathVariable Integer topicId);

     /** 
   * @Function: com.teemor.blog.service.ITopicService.countTopic
   * @Description: 统计条数
   * @param: inParam
   * @return: int
   * @version: v1.0.0
   * @author: zhoulk
   * @date: 2019/11/26 14:50:14
   *
   * Modification History:
   * Date         author          Version            Description
   *------------------------------------------------------*
   * 2019/11/26 14:50:14     zhoulk           v1.0.0             修改原因
   *
   */
    @RequestMapping(value = "/countTopic", method = RequestMethod.GET)
    @ApiOperation(value = "ITopicApiService.countTopic", notes = "数量统计接口 - zhoulk")
    int countTopic(@RequestBody QryTopicsIDTo inParam);

     /** 
   * @Function: com.teemor.blog.service.ITopicService.qryTopics
   * @Description: 查询列表
   * @param: inParam
   * @return: List<QryTopicsODTo>
   * @version: v1.0.0
   * @author: zhoulk
   * @date: 2019/11/26 14:50:14
   *
   * Modification History:
   * Date         author          Version            Description
   *------------------------------------------------------*
   * 2019/11/26 14:50:14     zhoulk           v1.0.0             修改原因
   *
   */
    @RequestMapping(value = "/topics", method = RequestMethod.GET)
    @ApiOperation(value = "ITopicApiService.qryTopics", notes = "列表查询接口 - zhoulk")
    ResponseBen<List<QryTopicsODTo>> qryTopicTree(QryTopicsIDTo inParam);



     /** 
   * @Function: com.teemor.blog.service.ITopicService.updTopicById
   * @Description: 根据ID更新
   * @param: inParam
   * @return: 
   * @version: v1.0.0
   * @author: zhoulk
   * @date: 2019/11/26 14:50:14
   *
   * Modification History:
   * Date         author          Version            Description
   *------------------------------------------------------*
   * 2019/11/26 14:50:14     zhoulk           v1.0.0             修改原因
   *
   */
    @RequestMapping(value = "/topic", method = RequestMethod.PUT)
    @ApiOperation(value = "ITopicApiService.updTopic", notes = "根据主键更新接口 - zhoulk")
    void updTopic(@RequestBody UpdTopicIDTo inParam);

     /** 
   * @Function: com.teemor.blog.service.ITopicService.addTopic
   * @Description: 新增接口
   * @param: inParam
   * @return: 
   * @version: v1.0.0
   * @author: zhoulk
   * @date: 2019/11/26 14:50:14
   *
   * Modification History:
   * Date         author          Version            Description
   *------------------------------------------------------*
   * 2019/11/26 14:50:14     zhoulk           v1.0.0             修改原因
   *
   */
    @RequestMapping(value = "topic", method = RequestMethod.POST)
    @ApiOperation(value = "ITopicApiService.addTopic", notes = "新增接口 - zhoulk")
    String addTopic(@RequestBody AddTopicIDTo inParam);

    /**
     * @Function: com.teemor.blog.api.ITopicApiService.delTopic
     * @Description: 根据主题ID删除主题
     *
     * @param: topicId
     * @return: java.lang.String
     *
     * @version: v1.0.0
     * @author: zhoulk
     * @date: 2020/2/3 11:08
     *
     * Modification History:
     * Date             Author      Version            Description
     *---------------------------------------------------------*
     * 2020/2/3 11:08    zhoulk      v1.0.0             修改原因
     *
     */
    @RequestMapping(value = "topic", method = RequestMethod.DELETE)
    String delTopic(@RequestParam Integer topicId);
}